package svc

import (
	"book/api/internal/config"
	"book/bookrpc/bookrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	BookRpc bookrpcclient.Bookrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		BookRpc: bookrpcclient.NewBookrpc(zrpc.MustNewClient(c.BookRpc)),
	}
}
